# 练习1:
# 	输出 0 ~ 9

num = 0
while num <= 9:
	print( num , end=" ")
	num += 1

print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')



# 练习2:
# 	输出 0 ~ 9 的总和

num = 0
sum = 0 	# 累加器
while num <= 9:
	sum += num
	num += 1

print(sum)



# 练习3:
# 	输出 0 ~ 9 之间所有的偶数

num = 0

while num <= 9:
	if num % 2 == 0: print(num)
	num += 1

print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')


num = 0

while num <= 9:
	if num & 1 == 0: print(num)
	num += 1
print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')

num = 0

while num <= 9:
	if not num & 1 : print(num)
	num += 1






